package topo.data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import topo.utils.ConstantDefine;

public class ResourceType implements Serializable {
    private String resoureTypeName = "";

    private String resouceBaseTechType = ConstantDefine.ResouceBaseTechType_System;

    private String resourceRSID = "";

    public static final String[][] rsTypeArray = { { "System", "系统", "", "系统发现方法", "default system", "" }, { "Web服务", "TCP服务", "80", "TCP服务发现方法", "", "" }, { "处理器", "SNMP表", "", "CPU发现方法", "", "" }, { "磁盘", "SNMP表", "", "磁盘发现方法", "", "" }, { "内存", "SNMP表", "", "内存发现方法", "", "" }, { "网络接口", "SNMP表", "", "网络接口发现方法", "", "" } };

    public static List<ResourceType> rsTypeList = new ArrayList();

    private String searchResourceClassName = "";

    private String typeImageName = "";

    private int isDefaultType = 1;

    private int typeViewSorteIndex = 0;

    private String typeDesc = "";

    private String typeParam = "";

    static {
        for (int i = 0; i < rsTypeArray.length; i++) {
            ResourceType rsType = new ResourceType(rsTypeArray[i][0], rsTypeArray[i][1], rsTypeArray[i][2], rsTypeArray[i][3], rsTypeArray[i][4], rsTypeArray[i][5]);
            rsTypeList.add(rsType);
        }
    }

    public ResourceType(String resoureTypeName, String resouceBaseTechType, String resourceRSID, String searchResourceClassName, String typeDesc, String typeParam) {
        this.resoureTypeName = resoureTypeName;
        this.resouceBaseTechType = resouceBaseTechType;
        this.resourceRSID = resourceRSID;
        this.searchResourceClassName = searchResourceClassName;
        this.typeDesc = typeDesc;
        this.typeParam = typeParam;
    }

    public static List<ResourceType> getRsTypeList() {
        return rsTypeList;
    }

    public String toString() {
        return "资源类型[" + getResoureTypeName() + "]";
    }

    public int hashCode() {
        return getResoureTypeName().hashCode();
    }

    public boolean equals(Object obj) {
        if ((obj instanceof ResourceType)) {
            ResourceType theDBkey = (ResourceType) obj;
            if (getResoureTypeName().equals(theDBkey.getResoureTypeName())) {
                return true;
            }
        }
        return false;
    }

    public String getResoureTypeName() {
        return this.resoureTypeName;
    }

    public void setResoureTypeName(String resoureTypeName) {
        this.resoureTypeName = resoureTypeName;
    }

    public String getResouceBaseTechType() {
        return this.resouceBaseTechType;
    }

    public void setResouceBaseTechType(String resouceBaseTechType) {
        this.resouceBaseTechType = resouceBaseTechType;
    }

    public String getResourceRSID() {
        return this.resourceRSID;
    }

    public void setResourceRSID(String resourceRSID) {
        this.resourceRSID = resourceRSID;
    }

    public String getSearchResourceClassName() {
        return this.searchResourceClassName;
    }

    public void setSearchResourceClassName(String searchResourceClassName) {
        this.searchResourceClassName = searchResourceClassName;
    }

    public String getTypeImageName() {
        return this.typeImageName;
    }

    public void setTypeImageName(String typeImageName) {
        this.typeImageName = typeImageName;
    }

    public int getIsDefaultType() {
        return this.isDefaultType;
    }

    public void setIsDefaultType(int isDefaultType) {
        this.isDefaultType = isDefaultType;
    }

    public int getTypeViewSorteIndex() {
        return this.typeViewSorteIndex;
    }

    public void setTypeViewSorteIndex(int typeViewSorteIndex) {
        this.typeViewSorteIndex = typeViewSorteIndex;
    }

    public String getTypeDesc() {
        return this.typeDesc;
    }

    public void setTypeDesc(String typeDesc) {
        this.typeDesc = typeDesc;
    }

    public String getTypeParam() {
        return this.typeParam;
    }

    public void setTypeParam(String typeParam) {
        this.typeParam = typeParam;
    }
}